<?php

include 'server.inc.php';
include 'func.inc.php';

set_include_path(implode(PATH_SEPARATOR, array(
    AGILET_LIBRARY_PATH,
    AGILET_APPLICATION_PATH,
    get_include_path()
)));

if (APPLICATION_ENV == 'development')
{
    ini_set('display_startup_errors', 1);
    ini_set('display_errors', 1);
    ini_set('error_reporting', E_ALL);
}

require_once 'Agilet.php';

spl_autoload_register(array(
    'Agilet',
    '__autoload'
));

set_error_handler(array(
    'Agilet',
    'errorHandler'
));

set_exception_handler(array(
    'Agilet',
    'exceptionHandler'
));

register_shutdown_function(array(
    'Agilet',
    'shutdownHandler'
));

session_start();
